<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <div th:replace="base(title='登录')"></div>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">Demo</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                <li><a th:href="@{/}">首页</a></li>
                <li><a href="#">测试1</a></li>
                <li><a href="#">测试2</a></li>
            </ul>
            <div class="navbar-form navbar-right">
                <a th:href="@{/login}" class="btn btn-primary">登录</a>
                <a href="#" class="btn btn-danger">注册</a>
            </div>
        </div>
    </div>
</nav>
<div class="container-fluid">

    <div class="row">
        <div class="col-md-4 col-md-offset-4">
            <form class="form-signin" method="post" th:action="@{/login/form}">
                <h2 class="form-signin-heading">登录</h2>
                <hr/>
                <div class="form-group">
                    <label for="inputUsername" class="sr-only">用户名</label>
                    <input type="text" id="inputUsername" name="username" value="system_admin" class="form-control" placeholder="Username" required autofocus>
                </div>
                <div class="form-group">
                    <label for="inputPassword" class="sr-only">密码</label>
                    <input type="password" id="inputPassword" name="password" value="123456" class="form-control" placeholder="Password" required>
                </div>
                <div class="checkbox">
                    <label>
                        <input type="checkbox" value="rememberMe"> 一周内记住我
                    </label>
                </div>
                <br/>
                <button class="btn btn-lg btn-primary btn-block" type="submit">登 录</button>
                <br/>

                <div th:if="${param.error}" class="alert alert-danger" role="alert">
                    登录失败！账号或密码错误。
                </div>

                <div th:if="${param.logout}" class="alert alert-success" role="alert">
                    注销成功！
                </div>

            </form>
        </div>
    </div>
</div>
</body>
</html>
